Fix npm package startup failure from effect peer-range skew - #113
Merged
Conversation
The published manifest pinned effect@4.0.0-beta.97 next to @effect/platform-node@4.0.0-beta.98, whose peer range (^4.0.0-beta.98) beta.97 cannot satisfy. npm resolved a second, newer effect at the tree root, and with two Effect runtimes in one process the server died before printing anything: every cold install of 0.3.1 exits 1 on all platforms. pnpm overrides hid the mismatch in development. - Align effect and @effect/platform-node-shared to 4.0.0-beta.98 so the exact pins satisfy every peer range in the family (patches rebased) - Pin @effect/platform-node-shared in the published manifest instead of letting platform-node's range float to an incompatible newer beta - Fail fast with an actionable error when an install contains two copies of effect; the mixed-runtime state otherwise poisons Effect's own error reporting and the process exits silently - Smoke-test the packed tarball in the npm-package workflow: install it like a real user, assert exactly one effect copy, and require the server to boot to its listening line
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every cold install of
@threadlines/server@0.3.1exits code 1 before printing anything, on Windows and Linux. The package has been dead on arrival since it was published on Aug 5.Root cause: the published manifest pins
effect@4.0.0-beta.97alongside@effect/platform-node@4.0.0-beta.98, whose peer range is^4.0.0-beta.98. beta.97 cannot satisfy it, so npm auto-installs a second, newer effect (beta.104 today) at the tree root while beta.97 nests under the package. Two Effect runtimes cannot share Context/Cause objects, and the mixed state also breaks Effect's own failure reporting: the fiber's teardown misclassifies the foreign Cause and callsprocess.exit(1)without printing. Development never sees this because pnpmoverridesforce a single copy.Fix
effectand@effect/platform-node-sharedto4.0.0-beta.98, so the exact pins satisfy every peer range in the effect family and npm dedupes to one runtime regardless of future effect releases. Both pnpm patches rebased (applied cleanly; patched behavior verified present).prepare-server-npm-package.tsnow pins@effect/platform-node-sharedin the published manifest; previously it floated on platform-node''s^4.0.0-beta.98range and could independently drag in another incompatible effect.effect, print which two and where, with recovery steps, instead of dying silently.Listening on httpline. The previous dry-run only grepped the tarball listing and could never catch runtime skew.Verification
vp fmt,vp lint,vp run typecheckgreen.main(pre-existing Windows-local), 1 passes in isolation (load flake). Zero regressions from the bump.node:22-bookwormcontainer; exactly oneeffectcopy in both trees.After merge: publish as 0.3.2.